Owen W. Taylor [Tue, 20 Oct 2015 16:39:57 +0000 (12:39 -0400)]
Guard against selection requestor disappearing
We made a number of unchecked accesses to the selection requestor,
which could cause X errors if the selection requestor vanished
(or we were sent invalid events). Add error traps around all of them.
See https://bugzilla.redhat.com/show_bug.cgi?id=
1210814 for an
example of a crash that could be caused by this. (There are about
1000 instances of such a crash in http://retrace.fedoraproject.org
though no linked bug reports specifically talk about cut-and-paste
or DND.)
https://bugzilla.gnome.org/show_bug.cgi?id=756881
Benjamin Otte [Wed, 14 Oct 2015 17:19:36 +0000 (19:19 +0200)]
iconcache: Remove unused function
Benjamin Otte [Mon, 7 Sep 2015 19:42:25 +0000 (21:42 +0200)]
window: Name the decoration style
Benjamin Otte [Mon, 7 Sep 2015 19:37:07 +0000 (21:37 +0200)]
window: Add gtk_widget_class_set_css_name()
This is to replace using class names as CSS names.
Benjamin Otte [Mon, 7 Sep 2015 19:31:57 +0000 (21:31 +0200)]
window: Refactor function
Move gtk_style_context_save() into the function that sets up the
decoration rendering.
Benjamin Otte [Mon, 7 Sep 2015 10:30:44 +0000 (12:30 +0200)]
notebook: Remove "prelight-page" class
Instead, just use the "tab:hover" selector
Benjamin Otte [Mon, 7 Sep 2015 10:26:33 +0000 (12:26 +0200)]
notebook: Remove "active-page" class
Instead, just use the "tab:active" selector
Benjamin Otte [Mon, 7 Sep 2015 10:20:54 +0000 (12:20 +0200)]
notebook: Remove funciton by folding it into callers
Benjamin Otte [Mon, 7 Sep 2015 10:11:09 +0000 (12:11 +0200)]
notebook: Refactor internal function
Don't return the state anymore as the function doesn't even look at the
state. Instead, make the callers that need the state query it manually.
Benjamin Otte [Mon, 7 Sep 2015 10:08:45 +0000 (12:08 +0200)]
notebook: Make tab positions permanent
... on the tab CssNodes.
Benjamin Otte [Mon, 7 Sep 2015 09:56:03 +0000 (11:56 +0200)]
notebook: Remove last traces of regions
Now that we don't use regions anymore, there's no need to update
anything when the regions change.
Benjamin Otte [Mon, 7 Sep 2015 09:52:55 +0000 (11:52 +0200)]
notebook: Set reorderable-page style class properly
Set it when the reorderable state changes, not just when rendering.
Benjamin Otte [Mon, 7 Sep 2015 09:39:55 +0000 (11:39 +0200)]
notebook: Set active state properly
Don't update it on save/restore, actually set it when it changes.
Benjamin Otte [Mon, 7 Sep 2015 00:15:25 +0000 (02:15 +0200)]
notebook: Set prelight state properly
Don't update it on save/restore, actually set it when it changes.
Benjamin Otte [Sun, 6 Sep 2015 23:44:53 +0000 (01:44 +0200)]
notebook: Use CssNodes instead of regions
This almost makes CSS work again with notebooks.
Benjamin Otte [Sun, 6 Sep 2015 23:26:19 +0000 (01:26 +0200)]
notebook: Move style_context_save() into function
This is for future changes.
Benjamin Otte [Tue, 8 Sep 2015 17:31:59 +0000 (19:31 +0200)]
css: Remove macros that were used only with regions
Benjamin Otte [Tue, 8 Sep 2015 17:31:37 +0000 (19:31 +0200)]
cssmatcher: Remove matching API for regions
Benjamin Otte [Sun, 6 Sep 2015 05:36:57 +0000 (07:36 +0200)]
treeview: Use a cssnode instead of regions
This makes Treeview headers work again like before region support was
removed.
Benjamin Otte [Sun, 6 Sep 2015 05:36:02 +0000 (07:36 +0200)]
API: cssselector: Stop supporting regions
The namespace that belonged to regions is supposed to be used for
CssNode names.
Benjamin Otte [Sat, 5 Sep 2015 23:46:24 +0000 (01:46 +0200)]
treeviewcolumn: Create button on init
This way, the button is always available and the code doesn't have to
special case this condition.
Benjamin Otte [Mon, 16 Feb 2015 22:05:05 +0000 (23:05 +0100)]
switch: Port to GtkCssNode
This is a simple port, no code modifications so far other than replacing
gtk_style_context_save() with gtk_style_context_save_to_node().
Benjamin Otte [Mon, 16 Feb 2015 15:37:33 +0000 (16:37 +0100)]
stylecontext: Add gtk_style_context_save_to_node()
To be used instead of gtk_style_context_save() with persistent nodes.
Benjamin Otte [Sat, 5 Sep 2015 04:58:17 +0000 (06:58 +0200)]
stylecontext: Add gtk_style_context_add_named()
This is an intermediate step for cssnode introduction. It gives a name
for the node created by saving the style context.
Benjamin Otte [Sat, 5 Sep 2015 04:39:10 +0000 (06:39 +0200)]
cssmatcher: Marshal name to matcher
... and use it in the node matcher.
Also rename function from _gtk_css_matcher_get_type() to
_gtk_css_matcher_get_name().
Benjamin Otte [Sat, 5 Sep 2015 04:31:32 +0000 (06:31 +0200)]
cssnode: Add setters/getters for name
Benjamin Otte [Fri, 4 Sep 2015 17:38:50 +0000 (19:38 +0200)]
cssnodedeclaration: Add possibility to set the name
This is supposed to be a replacement for setting the type. So far, both
options are possible - either will unset the other.
Benjamin Otte [Sat, 5 Sep 2015 19:44:13 +0000 (21:44 +0200)]
treeview: Remove "row" and "col" regions
They aren't used by the theme and we want to get rid of regions.
Piotr Drąg [Thu, 22 Oct 2015 00:01:05 +0000 (02:01 +0200)]
Updated POTFILES.in and POTFILES.skip
Matthias Clasen [Wed, 21 Oct 2015 21:15:17 +0000 (17:15 -0400)]
Update NEWS to mention help overlays
Matthias Clasen [Wed, 21 Oct 2015 19:48:20 +0000 (15:48 -0400)]
Update POTFILES.in
Matthias Clasen [Wed, 21 Oct 2015 04:14:38 +0000 (00:14 -0400)]
widget-factory: Add an automatic help overlay
This commit add some more keyboard shortcuts to gtk3-widget-factory,
and adds a help overlay documenting them. This examle uses the
automatic resource loading support in GtkApplication.
Matthias Clasen [Wed, 21 Oct 2015 04:11:59 +0000 (00:11 -0400)]
Add automatic help overlay support to GtkApplication
When the $(resource_prefix)/gtk/help-overlay.ui resource exists,
load a GtkShortcutsWindow from it for each GtkApplicationWindow,
and set up a win.show-help-overlay action with accels <Primary>F1
and <Primary>? to show it.
Matthias Clasen [Sun, 11 Oct 2015 20:48:08 +0000 (16:48 -0400)]
gtk-demo: Add a GtkShortcutsWindow demo
This example implements the mockups from the help overlay design,
showing off the various features of GtkShortcutsWindow.
Matthias Clasen [Sun, 11 Oct 2015 20:40:48 +0000 (16:40 -0400)]
Add some styling for GtkShortcutsWindow
Add some keycap frame around keysyms, and make the stack switcher
buttons rounds. This is very provisional.
Matthias Clasen [Sun, 11 Oct 2015 20:39:18 +0000 (16:39 -0400)]
Add GtkShortcutsWindow
This is a toplevel window that is tailored towards showing
help for shortcuts in an application. The implementation closely
follows this design: https://wiki.gnome.org/Design/OS/HelpOverlay
This implementation is inspired by earlier work in gnome-builder,
thanks to Christian Hergert.
https://bugzilla.gnome.org/show_bug.cgi?id=756428
Matthias Clasen [Sun, 11 Oct 2015 22:54:27 +0000 (18:54 -0400)]
builder: Support creating GFile objects
This is useful, e.g. when creating GFileIcon objects.
Matthias Clasen [Tue, 20 Oct 2015 00:42:52 +0000 (20:42 -0400)]
Don't use g_slist_next in the testsuite
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:42:12 +0000 (20:42 -0400)]
Don't use g_slist_next in gtktreeview.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:41:29 +0000 (20:41 -0400)]
Don't use g_slist_next in gtktreemodel.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:40:49 +0000 (20:40 -0400)]
Don't use g_slist_next in gtktextview.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:40:15 +0000 (20:40 -0400)]
Don't use g_slist_next in gtktextlayout.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:39:34 +0000 (20:39 -0400)]
Don't use g_slist_next in gtktextdisplay.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:38:38 +0000 (20:38 -0400)]
Don't use g_slist_next in gtktextchild.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:36:27 +0000 (20:36 -0400)]
Don't use g_slist_next in gtktextbufferrichtext.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:36:02 +0000 (20:36 -0400)]
Don't use g_slist_next in gtktextbuffer.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:34:58 +0000 (20:34 -0400)]
Don't use g_slist_next in gtkstock.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:33:50 +0000 (20:33 -0400)]
Don't use g_slist_next in gtkiconfactory.c
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:31:57 +0000 (20:31 -0400)]
Don't use g_slist_next in the x11 backend
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:30:33 +0000 (20:30 -0400)]
Don't use g_slist_next in the windows backend
We generally use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:28:06 +0000 (20:28 -0400)]
Don't use g_slist_next in gdk
We generally just use ->next directly.
Matthias Clasen [Tue, 20 Oct 2015 00:20:34 +0000 (20:20 -0400)]
Don't use g_list_next in gtk3-demo
We generally just use ->next directly.
Matthias Clasen [Mon, 19 Oct 2015 23:18:06 +0000 (19:18 -0400)]
Don't use g_list_next in gtkselection.c
We generally access ->next directly.
Matthias Clasen [Mon, 19 Oct 2015 23:15:30 +0000 (19:15 -0400)]
Don't use g_list_next in gtkmain.c
We generally access ->next directly.
Matthias Clasen [Mon, 19 Oct 2015 23:14:52 +0000 (19:14 -0400)]
Don't use g_list_next in gtkdialog.c
We generall access ->next directly.
Matthias Clasen [Mon, 19 Oct 2015 23:13:35 +0000 (19:13 -0400)]
Don't use g_list_next in gtkcontainer.c
We generally access ->next directory.
Matthias Clasen [Mon, 19 Oct 2015 23:10:42 +0000 (19:10 -0400)]
Don't use g_slist_next in gtktextbtree.c
We generally access ->next directly.
Matthias Clasen [Mon, 19 Oct 2015 22:33:10 +0000 (18:33 -0400)]
builder: Don't use g_slist_next
We just use direct access to list->next all over the place.
Matthias Clasen [Mon, 19 Oct 2015 18:58:35 +0000 (14:58 -0400)]
builder: Cosmetic changes
Use an iter instead of g_hash_table_forall.
Matthias Clasen [Mon, 19 Oct 2015 18:38:30 +0000 (14:38 -0400)]
Cosmetic changes
Line up struct-filling code with the order in the declaration.
Matthias Clasen [Mon, 19 Oct 2015 10:13:33 +0000 (06:13 -0400)]
Add some more builder parser tests
These tests contain non-canonical and non-existing property names.
Matthias Clasen [Mon, 19 Oct 2015 04:38:27 +0000 (00:38 -0400)]
builder: Avoid some unnecessary overhead
Only get the class once per object, not once per property.
And don't canonicalize the property name, g_object_class_find_property
does that already.
Inaki Larranaga Murgoitio [Tue, 20 Oct 2015 08:50:10 +0000 (10:50 +0200)]
Updated Basque language
Inaki Larranaga Murgoitio [Tue, 20 Oct 2015 08:03:39 +0000 (10:03 +0200)]
Updated Basque language
Paolo Borelli [Mon, 19 Oct 2015 09:41:34 +0000 (11:41 +0200)]
widget: fix typo in warning message
Jonas Ådahl [Tue, 13 Oct 2015 12:48:51 +0000 (20:48 +0800)]
wayland: Map windows with tooltip hint as subsurfaces
Tooltips tend to be placed on top of a parent surface with a given
relative coordinate, and without any input focus. So lets map them as
subsurfaces.
https://bugzilla.gnome.org/show_bug.cgi?id=756496
Jonas Ådahl [Tue, 13 Oct 2015 12:39:02 +0000 (20:39 +0800)]
wayland: Clean up code determining how to map a window
Restructure the mapping procedure so that its known up front what the
expected way mapping is to be done (subsurface, popup or stand alone),
and warn if it fails to actually map in such a way (for example a popup
without a parent or device grab, a tooltip without a parent).
https://bugzilla.gnome.org/show_bug.cgi?id=756496
Matthias Clasen [Sat, 17 Oct 2015 16:48:55 +0000 (12:48 -0400)]
Minor cleanup
Replace a unref-and-unset combination with g_clear_object.
Matthias Clasen [Sat, 17 Oct 2015 16:45:25 +0000 (12:45 -0400)]
Clean up handling of _gdk_win32_grab_cursor
This is a variable holding a ref to an object, so it is
a great case to use g_set_object and g_clear_object.
# Please enter the commit message for your changes. Lines starting
Руслан Ижбулатов [Sat, 17 Oct 2015 07:59:37 +0000 (07:59 +0000)]
W32: Add missing reference taking in gdk_device_virtual_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=756160
Kjartan Maraas [Sat, 17 Oct 2015 09:13:04 +0000 (11:13 +0200)]
Updated Norwegian bokmål translation.
Kjartan Maraas [Sat, 17 Oct 2015 09:11:01 +0000 (11:11 +0200)]
Fixes from Einar Ulvsløkk.
Timm Bäder [Fri, 16 Oct 2015 12:44:16 +0000 (14:44 +0200)]
GtkPaned: Fix gtk_paned_set_child_visible calls
Use CHILD1/CHILD2 instead of 0 and 1, always use the same order and
don't check for child NULL-ness, because it will be done in
gtk_paned_set_child_visible anyways.
Timm Bäder [Fri, 16 Oct 2015 12:11:28 +0000 (14:11 +0200)]
GtkRevealer: Remove useless _start_animation call
The call just passed priv->target_pos, but _start_animation directly
returns if the given target is priv->target_pos (see line 627).
William Hua [Thu, 15 Oct 2015 17:07:33 +0000 (18:07 +0100)]
mir: send touch events
Ignacio Casal Quinteiro [Fri, 16 Oct 2015 07:22:39 +0000 (09:22 +0200)]
win32: fix warnings about signed/unsigned mismatch
Ignacio Casal Quinteiro [Fri, 16 Oct 2015 07:07:02 +0000 (09:07 +0200)]
win32: use the same type as the prototype
Sébastien Wilmet [Thu, 15 Oct 2015 12:10:00 +0000 (14:10 +0200)]
inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround
The function is now safe to use.
https://bugzilla.gnome.org/show_bug.cgi?id=735341
Sébastien Wilmet [Thu, 15 Oct 2015 08:43:10 +0000 (10:43 +0200)]
textbuffer: nicer get_iter functions
Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.
A boolean is returned to know if @iter has been set to the exact
location.
Unit tests are added.
https://bugzilla.gnome.org/show_bug.cgi?id=735341
Dušan Kazik [Fri, 16 Oct 2015 06:31:32 +0000 (06:31 +0000)]
Updated Slovak translation
Dušan Kazik [Fri, 16 Oct 2015 06:26:53 +0000 (06:26 +0000)]
Updated Slovak translation
Matthias Clasen [Fri, 16 Oct 2015 03:04:44 +0000 (23:04 -0400)]
Split off a private header for GtkTextBuffer
This avoids polluting the installed header with private symbols.
Matthias Clasen [Fri, 16 Oct 2015 02:35:38 +0000 (22:35 -0400)]
Improve text a11y test
Test appending text as well as replacing the entire text.
Insert non-ASCII text to verify offsets are correct.
Matthias Clasen [Fri, 16 Oct 2015 00:53:43 +0000 (20:53 -0400)]
file chooser: Avoid search interruption
When the search entry is shown, the 'special' nature of
., ~ and / should not trigger the location entry, because
that interrupts the search and is likely not what the
user intended.
https://bugzilla.gnome.org/show_bug.cgi?id=756505
Matthias Clasen [Fri, 16 Oct 2015 00:16:54 +0000 (20:16 -0400)]
entry completion: Only grab the device if we have one
When the entry completion is popped up from a timeout, we may
not have a device. In that case, don't call gdk_device_grab,
do avoid criticals.
Matthias Clasen [Thu, 15 Oct 2015 20:06:15 +0000 (16:06 -0400)]
scrolled window: Protect against nameless devices
It seems that gdk_device_get_name() can return NULL.
We should not crash if that happens.
https://bugzilla.gnome.org/show_bug.cgi?id=756625
Carlos Soriano [Thu, 24 Sep 2015 09:54:58 +0000 (11:54 +0200)]
gtkplacesview: align spinner with header label
Use the box margin top instead of the label margin top,
so the spinner remains aligned with the header label.
https://bugzilla.gnome.org/show_bug.cgi?id=756568
Carlos Soriano [Wed, 14 Oct 2015 20:04:35 +0000 (22:04 +0200)]
gtkplacesview: plug leak
https://bugzilla.gnome.org/show_bug.cgi?id=756568
Carlos Soriano [Thu, 24 Sep 2015 12:49:30 +0000 (14:49 +0200)]
gtkplacesview: remove hover color from rows
Since other views are not using hover neither
https://bugzilla.gnome.org/show_bug.cgi?id=756568
Carlos Soriano [Thu, 24 Sep 2015 09:26:59 +0000 (11:26 +0200)]
gtkplacesview: add a clear button to address entry
So it allows a quick way to clear the entry.
https://bugzilla.gnome.org/show_bug.cgi?id=756568
Carlos Soriano [Thu, 24 Sep 2015 09:04:39 +0000 (11:04 +0200)]
gtkplacesview: rotate server list icon on toggled
Disclosure triangles are usually used pointing down, however
in this case the popover spawns in the upper direction, which
makes it odd looking.
Instead of pointing always down or up, point down when not toggled and
animate a rotation when toggled.
https://bugzilla.gnome.org/show_bug.cgi?id=756568
Carlos Soriano [Wed, 23 Sep 2015 17:55:11 +0000 (19:55 +0200)]
gtkplacesview: tweak ui to allow more server rows
Following design guidance, reduce row height and increase
popover height so the user is allowed to see more than 3
rows.
https://bugzilla.gnome.org/show_bug.cgi?id=756568
Carlos Soriano [Wed, 14 Oct 2015 19:48:06 +0000 (21:48 +0200)]
gtkplacesview: improve heuristics for external drives
Following the sidebar on commit
b0989b190df, improve the way
we check when a drive is external or not.
https://bugzilla.gnome.org/show_bug.cgi?id=756589
Carlos Soriano [Wed, 14 Oct 2015 19:47:39 +0000 (21:47 +0200)]
gtkplacesview: remove dead code
This is checked on add_volume inside the loop.
https://bugzilla.gnome.org/show_bug.cgi?id=756589
Carlos Soriano [Wed, 14 Oct 2015 19:47:03 +0000 (21:47 +0200)]
gtkplacesview: remove dead code
This is checked on is_removable_volume
https://bugzilla.gnome.org/show_bug.cgi?id=756589
Carlos Soriano [Wed, 14 Oct 2015 19:42:16 +0000 (21:42 +0200)]
gtkplacessidebar: improve heuristics for external drives
Since the change to use GtkPlacesView we don't want to show
internal storage on the sidebar.
In our case we were checking for drive_can_eject and
drive_is_media_removable.
However for some external hard drives it's reported that they
are not ejectable nor the have removable media. So the only
attribute that they have different from internal drives is that
they can be stopped.
So check for if the drive can be stopped to decide if it is
external or internal.
On the way realized we don't need to check for the mounts associated
with the volume to know if the volume can be ejected or not. So remove
that code.
https://bugzilla.gnome.org/show_bug.cgi?id=756589
William Hua [Thu, 15 Oct 2015 15:20:32 +0000 (16:20 +0100)]
mir: add mircookie as a dependency
Carlos Garnacho [Wed, 14 Oct 2015 15:27:53 +0000 (17:27 +0200)]
texthandle: Ensure handles are invalidated on mode changes
Otherwise the "cursor" handle stays with "cursor" appearance instead of
"selection end" when a text selection is started.
Carlos Garnacho [Wed, 14 Oct 2015 15:41:12 +0000 (17:41 +0200)]
texthandle: small refactor
These long enums are used too often, shorten things a bit with temp vars.
Carlos Garnacho [Wed, 14 Oct 2015 15:21:25 +0000 (17:21 +0200)]
texthandle: Fix Y positioning of text handles
It is assumed that border.top is the same than pointing_to.height (which
equals the strong cursor position), which is not since some time ago.
The border calculation has been move on top too, it is now used in the
Y position one, and doesn't depend on anything we calculate later.